#pragma once
#include "acllib.h"

#define HEIGHT 0x200
#define WIDTH 0x200
#define MAX_ARR_SIZE 0x100
#define LINE_HEIGHT 0x10

#define BACKSPACE 8
#define ENTER_KEY 13

typedef enum {
	not_started, entering, finished
}filenameState;

int rgb[3];
int i, size;
filenameState enteringFileName;
extern char filename[MAX_ARR_SIZE];
extern char paintBuf[MAX_ARR_SIZE];
#define paint_buf paintBuf

void mouseEvent(int x, int y, int button, int event);
void KeyDown(int key, int event);
__inline ACL_Color GF_RGB(int rgb[]) {
	return RGB(rgb[0], rgb[1], rgb[2]);
}

#define CLEAR_BOTTOM do{\
setBrushColor(WHITE);\
setPenColor(WHITE);\
rectangle(0, LINE_HEIGHT, WIDTH,\
 HEIGHT - 2 * LINE_HEIGHT); \
}while (0);

#define END_PROGRAM do{\
	endPaint();\
	exit(0);\
}while(0);